package com.wuster.exception;

import com.wuster.result.ResultCodeEnum;
import lombok.Data;

/**
 * ClassName: CategoryException
 * Package: com.wuster.exception
 * Description: TODO
 *
 * @Author VictoriaZhou
 * @Create 2024/7/9 9:41
 * @Version 1.0
 */
@Data
public class CategoryException extends RuntimeException{
    private Integer code;

    public CategoryException(Integer code,String message){
        super(message);
        this.code = code;
    }
    public CategoryException(ResultCodeEnum resultCodeEnum){
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
    }
}
